package com.esri.core.map;

import com.esri.core.internal.util.d;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;
import org.codehaus.jackson.util.MinimalPrettyPrinter;

/* loaded from: classes.dex */
public class OwnershipBasedAccessControlForFeatures {
    private boolean a = false;
    private boolean b = false;
    private boolean c = false;

    public boolean isAllowOthersToUpdate() {
        return this.a;
    }

    public boolean isAllowOthersToDelete() {
        return this.b;
    }

    public boolean isAllowOthersToQuery() {
        return this.c;
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("Others can");
        boolean z = this.a;
        String str = MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR;
        sb.append(z ? MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR : "not ");
        sb.append("update; ");
        sb.append("can");
        sb.append(this.c ? MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR : "not ");
        sb.append("query; ");
        sb.append("can");
        if (!this.b) {
            str = "not ";
        }
        sb.append(str);
        sb.append("delete.");
        return sb.toString();
    }

    public static OwnershipBasedAccessControlForFeatures fromJson(JsonParser jsonParser) throws Exception {
        if (d.c(jsonParser)) {
            OwnershipBasedAccessControlForFeatures ownershipBasedAccessControlForFeatures = new OwnershipBasedAccessControlForFeatures();
            while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
                String currentName = jsonParser.getCurrentName();
                jsonParser.nextToken();
                if (currentName.equals("allowOthersToDelete")) {
                    ownershipBasedAccessControlForFeatures.b = jsonParser.getBooleanValue();
                } else if (currentName.equals("allowOthersToUpdate")) {
                    ownershipBasedAccessControlForFeatures.a = jsonParser.getBooleanValue();
                } else if (currentName.equals("allowOthersToQuery")) {
                    ownershipBasedAccessControlForFeatures.c = jsonParser.getBooleanValue();
                } else {
                    jsonParser.skipChildren();
                }
            }
            return ownershipBasedAccessControlForFeatures;
        }
        return null;
    }
}
